Index

api/v1/pos/{pono}/comments

Path: api/v1/pos/{pono}/comments

This API is JSON:API compliant.

This endpoint supports the following methods:
GET POST PATCH

The resource type for this endpoint is PurchaseComment
The identifier is pono-lineid

The PurchaseComment resource type attributes are as follows:

{
"include":boolean
"status":string (read-only)
"comment":string
"modifyInit":string (read-only)
The modification date and time of the comment in ISO date time format. Timezone is the timezone of the Jim2 server.
"modifyDate":string (read-only)
}

Example GET (Return all)

Path: api/v1/pos/10/comments

Response:

{
    "data": [
        {
            "id": "10-1",
            "type": "PurchaseComment",
            "attributes": {
                "include": false,
                "status": "Booked",
                "comment": "",
                "modifyInit": "SYS",
                "modifyDate": "2024-03-25T17:07:23+11:00"
            }
        },
        {
            "id": "10-2",
            "type": "PurchaseComment",
            "attributes": {
                "include": false,
                "status": "FINISH",
                "comment": "Unprinted",
                "modifyInit": "SYS",
                "modifyDate": "2024-03-20T11:35:49+11:00"
            }
        }
    ]
}

Example GET (Return specific)

Path: api/v1/pos/10/comments/10-1

Response:

{
    "data": {
        "id": "10-1",
        "type": "PurchaseComment",
        "attributes": {
            "include": false,
            "status": "Booked",
            "comment": "",
            "modifyInit": "SYS",
            "modifyDate": "2024-03-20T10:59:42+11:00"
        },
      "links": {
        "10-": null,
        "self": "/api/v1/pos/10/comments/10-1"
      }
    }
}

Example POST

Path: api/v1/pos/10/comments

Request:

{
    "data": {
        "type": "PurchaseComment",
        "attributes": {
            "include": false,
            "comment": "Add new comment"
        }
    }
}

Response:

{
    "data": {
        "id": "10-3",
        "type": "PurchaseComment",
        "attributes": {
            "include": false,
            "status": null,
            "comment": "Add new comment",
            "modifyInit": "API",
            "modifyDate": "2025-03-27T12:39:29+11:00"
        },
      "links": {
        "self": "/api/v1/pos/10/comments/10-3"
      }
    }
}

Example PATCH

Path: api/v1/pos/10/comments/10-1

Request:

{
    "data": {
        "id": "10-1",
        "type": "PurchaseComment",
        "attributes": {
            "include": true,
			"include": "FINISH",
            "comment": "Test 2"
        }
    }
}

Response:

{
	"data": {
		"id": "10-1",
		"type": "PurchaseComment",
		"attributes": {
			"include": true,
			"status": "FINISH",
			"comment": "Test 2",
			"modifyInit": "API",
			"modifyDate": "2021-03-10T11:33:53"
		},
		"links": {
			"self": "/api/v1/pos/10/comments/10-1"
		}
	}
}